<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    document.write的转义符必须放在<code> pre</code>才有效。

<script>
document.write(`<pre>`)
document.write(`该顾客购买猪肉的款为：\n`);
document.write(12.5*3.5);
document.write(`元`+`<br>`);
document.write(`无穷大当1/0时：`+`<br>`);
document.write(1/0);
document.write(`<br>-1/无穷小时：`);
document.write(-1/0);
document.write(`<br><br>特殊值NaN，用0除0会得出:<br/>`);
document.write(0/0);
document.write(`</pre>`)

//变量
var num=100;
num="有一条路，走过了总会想起";
document.write(num+`<br>---------<br>`);

const d1=100;
document.write(d1);
</script>    


</body>
</html>